html, body {
	width: 100%;
	height: 100%;
	margin: 0px !important;
}

p {
	margin: 5px;
}

h1, h2, h3, h4, h5, h6 {
	margin: 10px;
}

ul, ol {
	margin: 10px;
}

.icon {
	-webkit-user-drag: none;
}

.loader {
	margin: 0 !important;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
	height: 100% !important;
	background-color: rgba(128, 128, 128, 0.5);
}

.form {
	margin: 10px;
	display: flex;
	flex-flow: row;
	justify-content: center;
	align-items: center;
}

input {
	flex: 1;
}

.info {
	margin: 10px;
}

.err-message {
	color: red;
}

.chat_window {
	display: flex;
	flex-direction: column;
	margin: 12px;
	flex: 1;
	width: calc(100% - 24px);
}

#chat_wrapper {
	flex: 1;
	padding: 0;
	margin-bottom: 6px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}
#chat_wrapper.empty {
	justify-content: center;
}

#chat {
	height: auto;
	padding: 10px 13px;
	display: flex;
	flex-direction: column;
	overflow: auto;
	position: relative;
}

.message {
	margin-top: 10px;
	line-height: 16px;
}

.action_buttons_list {
	margin-top: 4px;
	display: flex;
	opacity: 0;
	transition: 0.1s opacity;
}
.message:hover .action_buttons_list,
#chat .message:first-child .action_buttons_list{
	opacity: 1;
}
.action_button {
	padding: 0;
	display: flex;
	height: auto;
}
.action_button:not(:first-child) {
	margin-left: 4px;
}

.action_button img {
	margin: 2px;
	width: 20px;
	height: 20px;
}

.message_content {
	display: flex;
	flex-direction: column;
	padding: 6px 8px;
	height: fit-content;
	width: fit-content;
	height: fit-content;
}

.message_content_attached_wrapper {
	display: flex;
	align-items: stretch;
	margin-bottom: 8px;
	background-color: #fff;
	background-color: var(--background-normal);
	padding: 6px 8px;
	border: 1px solid #e1e1e1;
	border: 1px solid var(--border-regular-control);
	border-radius: 2px;
}

.message_content_attached {
	display: -webkit-inline-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message_content_attached_wrapper.collapsed .message_content_attached {
	-webkit-line-clamp: 3;
}

.message_content_collapse_btn {
	display: flex;
	align-items: center;
	margin-left: 8px;
	cursor: pointer;
}
.message_content_collapse_btn:hover {
	opacity: 0.7;
}

.message_content_collapse_btn img {
	width: 20px;
	height: 20px;
	transform: rotate(-180deg);
	transition: 0.1s transform;
}
.message_content_attached_wrapper.collapsed .message_content_collapse_btn img  {
	transform: rotate(0deg);
}

.message_content_error_title {
	display: flex;
	align-items: center;
}

.message_content_error_title img {
	width: 20px;
	height: 20px;
	margin: -4px 2px -4px -4px;
}

.message_content_error_title div {
	font-weight: bold;
}

.message_content_error_desc {
	margin-top: 4px;
	color: rgba(0, 0, 0, 0.6);
	color: var(--text-secondary);
	line-height: 14px;
}

.message_content_replies_switch {
	margin-top: 10px;
	padding: 2px 0;
	display: flex;
	align-items: center;
}

.message_content_replies_switch button {
	padding: 0;
    border: none;
    background: none;
    display: flex;
	cursor: pointer;
}
.message_content_replies_switch button[disabled]{
	opacity: 0.5;
	cursor: default;
}

.message_content_replies_switch button img{
	width: 20px;
	height: 20px;
	flex: 1;
}

.message_content_replies_switch .decrement{
	transform: rotate(90deg);
}

.message_content_replies_switch .increment{
	transform: rotate(-90deg);
}

.message_content_replies_switch div{
	padding: 0px 4px;
}

.span_message {
	white-space: normal;
}

.span_message h1,
.span_message h2,
.span_message h3,
.span_message h4,
.span_message h5,
.span_message h6 {
	line-height: 1.3;
	margin-left: 0;
	margin-right: 0;
}

.span_message h1  {
	font-size: 1.8em;
}
.span_message h2  {
	font-size: 1.7em;
}
.span_message h3  {
	font-size: 1.5em;
}
.span_message h4  {
	font-size: 1.3em;
}
.span_message h5  {
	font-size: 1.15em;
}
.span_message h6  {
	font-size: 1em;
}

.span_message p {
	margin: 0;
}

#loading .span_message {
	padding: 0;
	color: rgba(0, 0, 0, 0.4);
	color: var(--text-tertiary);
}

#start_panel {
	height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#chat_wrapper:not(.empty) #start_panel {
	display: none;
}

#welcome_text {
	width: fit-content;
	height: fit-content;
	white-space: normal;
	line-height: 16px;
	margin-bottom: 20px;
	text-align: center;
	max-width: 330px;
}

#welcome_buttons_list {
	display: flex;
    flex-wrap: wrap;
	justify-content: center;
	margin: -2px;
	max-width: 330px;
}

.welcome_button {
	cursor: pointer;
	width: fit-content;
	height: fit-content;
	line-height: 16px;
	padding: 4px 8px;
	margin: 2px;
}

.user_message {
	display: flex;
	justify-content: end;
}

.user_message .message_content {
	background-color: #fff;
	background-color: var(--background-toolbar);
	/* background-color: var(--highlight-button-hover); */
}

.tokens_info {
	margin: 5px 0;
	width: fit-content;
	align-self: end;
}

.text_align_end {
	text-align: end;
}

.div_title_chat {
	position: absolute;
    z-index: 1;
    height: fit-content;
    padding: 8px 5px;
    right: 5px;
	left: 5px;
	top: 225px;
	overflow-wrap: anywhere;
}

.error_border {
	border: 1px solid red !important;
}

.div_error {
	position: absolute;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	top: 0;
	left: 0;
}

.lb_err {
	color: red;
	padding: 2px 10px;
}

.hidden {
	display: none !important;
}

#attached_text_wrapper {
	padding: 6px 8px;
	background-color: #fff;
	background-color: var(--background-toolbar);
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	border: 1px solid #e1e1e1;
	border: 1px solid var(--border-regular-control);
	margin-bottom: -1px;
	display: flex;
	justify-content: space-between;
}

#attached_text {
	line-height: 16px;
	display: -webkit-inline-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
}

#attached_text_close {
	margin-left: 8px;
	height: 20px;
	width: 20px;
	cursor: pointer;
}
#attached_text_close:hover {
	opacity: 0.7;
}

#input_message_wrapper {
	display: flex;
	background-color: #fff;
	background-color: var(--background-normal);
	border-radius: 2px;
	border: 1px solid #e1e1e1;
	border: 1px solid var(--border-regular-control);
	position: relative;
}

#input_message_wrapper.focused {
	border-color: #4A87E7;
	border-color: var(--border-control-focus);
}

#input_message {
	flex: 1;
	padding: 0;
	padding: 6px 32px 6px 6px;
	margin: 2px 2px 2px 2px;
    min-height: 16px;
    max-height: 82px;
    overflow-y: auto;
    resize: none;
    line-height: 16px;
	border: none;
	font-family: Arial, sans-serif;
}
#input_message::-webkit-scrollbar-track {
	margin-bottom: 34px;
}

#input_message_submit {
	position: absolute;
	right: 0;
	bottom: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 7px 7px 7px 0px;
}
#input_message_submit:hover {
	opacity: 0.7;
}
#input_message_submit img {
	width: 20px;
	height: 20px;
}


/* #input_message_wrapper {
	display: flex;
	position: relative;
}

#input_message {
	width: 100%;
	padding: 8px 40px 8px 8px;
    min-height: 36px;
    max-height: 98px;
    overflow-y: auto;
    resize: none;
    line-height: 16px;
}

#input_message_submit {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	bottom: 1px;
	right: 1px;
	width: 34px;
	height: 34px;
}
#input_message_submit img {
	width: 20px;
	height: 20px;
} */